New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change order of lines to properly raise events #1545
Conversation
What do you mean not tested? And why does the lines changing order fix it? |
I mean that I did not check if the entire game remains sane. Changing the order of these lines indeed helped resolve the issue due to the ordering of the value adjustment. |
This is a hard logic scenario to assess. |
@smoogipoo requesting your review on this as I modified the behaviour and added considerably. |
@@ -164,14 +164,20 @@ public virtual void TriggerChange() | |||
|
|||
protected void TriggerValueChange(bool propagateToBindings = true) | |||
{ | |||
ValueChanged?.Invoke(value); | |||
// check a bound bindable hasn't changed the value again (it will fire its own event) | |||
T beforePropagation = Value; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Commit missed change from #1545
Resolves #2460 and every other future similar implementation's issues with resetting values.
This is not really tested, but it should (hopefully) not break anything.